//
//  Ext+UIBarButtonItem.swift
//  微博
//
//  Created by 范承志 on 16/6/11.
//  Copyright © 2016年 fanchengzhi. All rights reserved.
//

import UIKit

extension UIBarButtonItem{

convenience init(highlightedImgName: String? = nil, title: String? = nil, target: Any?, action: Selector) {
    
    self.init()
    //调用带有title的button快捷方式
    let button = UIButton(highlightedImgName: highlightedImgName, title: title, target: target, action: action)
    //把自定义的按钮赋值给原生的系统按钮
    self.customView = button
    
    }
}
